<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        {% block title %}
        {% endblock %}
    </title>
    <link rel="stylesheet" href="../../static/css/base/reset.css">
    <link rel="stylesheet" href="../../static/css/base/common.css">
    <link rel="stylesheet" href="../../static/css/news/index.css">
    <link rel="stylesheet" href="../../static/css/base/side.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_684044_un7umbuwwfp.css">
    {% block link %}
    {% endblock %}
</head>
<body>
<!-- header start -->
<header id="header">
    <div class="mw1200 header-contain clearfix">
        <!-- logo start -->
        <h1 class="logo">
            <a href="javascript:void(0);" class="logo-title">Python</a>
        </h1>
        <!-- logo end -->
        <!-- nav start -->
        <nav class="nav">
            <ul class="menu">
                <li><a href="{% url 'news:index' %}">首页</a></li>
                <li><a href="{% url 'courses:course' %}">在线课堂</a></li>
                <li><a href="{% url 'docs:docs' %}">下载文档</a></li>
                <li><a href="{% url 'news:search' %}">搜索</a></li>
            </ul>
        </nav>
        <!-- nav end -->
        <!-- login start -->
        <div class="login-box">
            {% if user.is_authenticated %}
                <div class="author">
                    <i class="PyWhich py-user"></i>
                    <span>{{ user.username }}</span>
                    <ul class="author-menu">
                        {% if user.is_staff %}
                            <li><a href="javascript:void(0);">后台管理</a></li>
                        {% endif %}
                        <li><a href="{% url 'users:logout' %}">退出登录</a></li>
                        <li><a href="{% url 'users:changepwd' %}">修改密码</a></li>
                    </ul>
                </div>
            {% else %}
                <div>
                    <i class="PyWhich py-user"></i>
                    <span>
                  <a href="{% url 'users:login' %}" class="login">登录</a><!-- href="/login/" -->
                    /
                    <a href="{% url 'users:register' %}" class="reg">注册</a><!-- href="/register/" -->
              </span>
                </div>
            {% endif %}
        </div>
        <!-- login end -->
    </div>
</header>
<!-- header end -->

<!-- main start -->
{% block main %}
    <main id="main">
        <div class="w1200 clearfix">
            <!-- main-contain start  -->
            {#  右边#}
            {% block main_contain %}

            {% endblock %}
            <!-- main-contain  end -->
            {#   左边#}
            <!-- side start -->
            {% block side %}

            {% endblock %}
            <!-- side end -->
        </div>
    </main>
{% endblock %}
<!-- main end -->

<!-- footer start -->
<footer id="footer">
    <div class="footer-box">
        <div class="footer-content">
            <p class="top-content">
					<span class="link">
						<a href="javascript:void(0)">关于Python</a> |
						<a href="javascript:void(0)">我就是我</a> |
						<a href="javascript:void(0)">人生苦短</a> |
						<a href="javascript:void(0)">我用Python</a>
					</span>
                <span class="about-me">关于我: <i class="PyWhich py-wechat"></i> Taka</span>
            </p>
            <p class="bottom-content">
                <span>地址： xxxx</span>
                <span>联系方式: <a href="tel:400-1567-315">400-1567-315</a> (24小时在线)</span>
            </p>
        </div>
        <p class="copyright-desc">
            Copyright &copy; 2008 - 2019 xxx有限公司. All Rights Reserved
        </p>
    </div>
</footer>
<!-- footer end -->
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<script src="../../static/js/commons.js"></script>
{#<script src="../../static/js/index.js"></script>#}
<script src="../../static/js/base/message.js"></script>
{% block script %}
{% endblock %}
</body>
</html>
